package cn.shujuhai.workflow.domain;

import cn.shujuhai.common.domain.BaseDomain;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * @TableName form_data
 */
@TableName(value = "form_data")
@Data
public class FormData {
    /**
     * 表单数据ID
     */
    @TableId(type = IdType.AUTO)
    private Long formDataId;

    /**
     * 表单ID
     */
    private Long formId;

    /**
     * 表单数据
     */
    private Object formData;

    /**
     * 提交用户
     */
    private String submitUser;
    /**
     * 提交用户ID
     */
    private Long submitUserId;
    /**
     * 提交用户
     */
    private String processInstanceId;

    private String taskId;


    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;


    /**
     * 表单名称
     */
    @TableField(exist = false)
    private String formName;

    @TableField(exist = false)
    private Object fieldData;

    @TableLogic
    private Integer deleted;

    @TableField(exist = false)
    private String processDefinitionId;

    @TableField(exist = false)
    private Map<String, Object> data;

}